SHOW-DATABASES
SHOW-DATABASES
Name
SHOW DATABASES
Description
This statement is used to display the currently visible db
Syntax:
SHOW DATABASES [FROM catalog] [filter expr];
Note:
SHOW DATABASESwill display all database namesSHOW DATABASES FROM catalogwill display all database names from the current catalog.SHOW DATABASES filter_exprwill display filtered database names from the current catalog.SHOW DATABASES FROM catalog filter_expris not support yet.
Example
Display all the database names
SHOW DATABASES;+--------------------+
| Database |
+--------------------+
| test |
| information_schema |
+--------------------+Display all database names from the catalog named 'hms_catalog'.
SHOW DATABASES from hms_catalog;+---------------+
| Database |
+---------------+
| default |
| tpch |
+---------------+Display the filtered database names from the current catalog using the expression
like 'infor%'.SHOW DATABASES like 'infor%';+--------------------+
| Database |
+--------------------+
| information_schema |
+--------------------+
Keywords
SHOW, DATABASES